﻿using Newtonsoft.Json;
using PoiModel;

namespace WindowsFormsApplication1.Model
{
    /// <summary>
    /// 腾讯地图关键词输入提示API 响应结果实体类
    /// </summary>
    public class TxMapGuideSuggestResultDto
    {
        /// <summary>
        /// 响应结果 状态码
        /// </summary>
        [JsonProperty("status")]
        public int Status { get; set; }

        /// <summary>
        /// 状态说明
        /// </summary>
        [JsonProperty("message")]
        public string Message { get; set; }

        /// <summary>
        /// 结果总数
        /// </summary>
        [JsonProperty("count")]
        public int Count { get; set; }

        /// <summary>
        /// 提示词数组，每项为一个POI对象
        /// </summary>
        [JsonProperty("data")]
        public Datum[] Data { get; set; }

        /// <summary>
        /// request_id
        /// </summary>
        [JsonProperty("request_id")]
        public string RequestId { get; set; }
    }

    /// <summary>
    /// POI信息
    /// </summary>
    public partial class Datum
    {
        /// <summary>
        /// POI唯一标识
        /// </summary>
        [JsonProperty("id")]
        public string Id { get; set; }

        /// <summary>
        /// 提示文字
        /// </summary>
        [JsonProperty("title")]
        public string Title { get; set; }

        /// <summary>
        /// 地址
        /// </summary>
        [JsonProperty("address")]
        public string Address { get; set; }

        /// <summary>
        /// POI分类
        /// </summary>
        [JsonProperty("category")]
        public string Category { get; set; }

        /// <summary>
        /// POI类型，值说明：0:普通POI / 1:公交车站 / 2:地铁站 / 3:公交线路 / 4:行政区划
        /// </summary>
        [JsonProperty("type")]
        public int Type { get; set; }

        /// <summary>
        /// 提示所述位置坐标
        /// </summary>
        [JsonProperty("location")]
        public Location Location { get; set; }

        /// <summary>
        /// 行政区划代码
        /// </summary>
        [JsonProperty("adcode")]
        public int Adcode { get; set; }

        /// <summary>
        /// 省份
        /// </summary>
        [JsonProperty("province")]
        public string Province { get; set; }

        /// <summary>
        /// 城市
        /// </summary>
        [JsonProperty("city")]
        public string City { get; set; }

        /// <summary>
        /// 区县
        /// </summary>
        [JsonProperty("district")]
        public string District { get; set; }
    }

    /// <summary>
    /// 定位坐标信息
    /// </summary>
    public partial class Location
    {
        /// <summary>
        /// 纬度
        /// </summary>
        [JsonProperty("lat")]
        public double Lat { get; set; }

        /// <summary>
        /// 经度
        /// </summary>
        [JsonProperty("lng")]
        public double Lng { get; set; }
    }

}